package org.dromara.xhlj.domain.vo;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.xhlj.domain.XhljGoods;
import org.dromara.xhlj.domain.XhljConferenceInfo;
import org.dromara.xhlj.domain.XhljGoodsRedemptionRecords;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreType;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.dromara.common.core.utils.tree.TreeCruxField;
import org.dromara.wx.domain.WxUser;
import org.dromara.wx.domain.vo.WxUserVo;
import org.dromara.system.domain.SysUser;
import org.dromara.system.domain.vo.SysUserVo;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * 商品视图对象 xhlj_goods
 *
 * @author yf
 * @date 2024-07-28
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = XhljGoods.class)
public class XhljGoodsVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 商品ID
     */
    @ExcelProperty(value = "商品ID")
    private Integer goodId;
    /**
     * 商品名称
     */
    @ExcelProperty(value = "商品名称")
    private String goodName;
    /**
     * 大会id
     */
    @ExcelProperty(value = "大会id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @Translation(type = XhljConferenceInfo.TRANS_ID_TO_VO, mapper = "conferenceInfoId")
    private XhljConferenceInfoVo conferenceInfo;
    private Integer conferenceInfoId;
    /**
     * 详细描述
     */
    @ExcelProperty(value = "详细描述")
    private String detailedDescription;
    /**
     * 创建人sys_user（大会管理员/活动负责人）
     */
    @ExcelProperty(value = "创建人sys_user")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @Translation(type = SysUser.TRANS_ID_TO_VO, mapper = "createBy")
    private SysUserVo sysUser;
    private Integer createBy;
    /**
     * 销售类型（0=积分，1=价格）
     */
    @ExcelProperty(value = "销售类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "shelf_type")
    @Translation(type = TransConstant.DICT_TYPE_TO_LABEL, other = "shelf_type", mapper = "shelfType")
    private String shelfTypeDictData;
    private String shelfType;
    /**
     * 销售价/积分
     */
    @ExcelProperty(value = "销售价/积分")
    private BigDecimal salePricePoints;
    /**
     * 图片
     */
    @ExcelProperty(value = "图片")
    private String productImage;
    /**
     * 上架状态（0=未上架，1=已上架）
     */
    @ExcelProperty(value = "上架状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "shelf_status")
    @Translation(type = TransConstant.DICT_TYPE_TO_LABEL, other = "shelf_status", mapper = "shelfStatus")
    private String shelfStatusDictData;
    private String shelfStatus;
    /**
     * 上架时间
     */
    @ExcelProperty(value = "上架时间")
    private Date shelfTime;
    /**
     * 下架时间
     */
    @ExcelProperty(value = "下架时间")
    private Date unshelfTime;
    /**
     * 销量
     */
    @ExcelProperty(value = "销量")
    private Integer salesVolume;
    /**
     * 库存量
     */
    @ExcelProperty(value = "库存量")
    private Integer inventoryVolume;
    /**
     * 商品标签（0=纪念品，1=书籍）
     */
    @ExcelProperty(value = "商品标签", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "product_tags")
    @Translation(type = TransConstant.DICT_TYPE_TO_LABEL, other = "product_tags", mapper = "productTags")
    private String productTagsDictData;
    private String productTags;
    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 商品兑换记录 子列表
     */
    @JsonIgnore
    @Translation(type = XhljGoodsRedemptionRecords.TRANS_ID_TO_VO_LIST, mapper = "goodId" , other = "goods_id")
    private List<XhljGoodsRedemptionRecordsVo> xhljGoodsRedemptionRecordsVoList;
}
